\subsection{Use Case Diagram}
\label{sub:use_case_diagram}

\begin{figure}[ht]
	  	\begin{center}
	    	\includegraphics[width=1.0\columnwidth]{UseCasePhoto}
	  	\end{center}
	  	\caption{Use Case Diagram}
	  	\label{figUC}
\end{figure}

\subsection{Use Case Summaries}
\label{sub:use_case_summaries}
    \begin{itemize}
    \item \textbf{Enter Operand}. The user enters an operand and it is stored on the stack where it will be operated on later.
    \item \textbf{Create a Polynomial}. The user creates a polynomial from a sequence of numbers representing coefficients and exponents.
    \item \textbf{Operate}. The user performs some operation on operands previously entered into the calculator.
\end{itemize}

\subsection{Use Case Descriptions}
\label{sub:use_case_descriptions}
\textbf{Use Case:} Enter an Operand \\
\textbf{Summary:} The user enters an operand and it is stored on the stack where it will be operated on later. \\
\textbf{Actors:} User \\
\textbf{Preconditions:} The calculator is turned on and waiting for input.\\
\textbf{Description:} The calculator starts in an idle state waiting for user input. Nothing is initially displayed on the screen. A number is entered by pressing either the keyboard number pad or the on-screen GUI buttons. As buttons are pressed, their corresponding numbers are displayed on the calculator screen. When the user has entered the entire number into the calculator, they will press enter. The number is then moved to the stack and the display is cleared.\\
\textbf{Exceptions:}\\
\textit{Invalid Operand:} If an invalid operand is entered, an error is displayed.\\
\textbf{Postconditions:} The entered operand is sitting at the top of the stack, and the display is cleared.\\

\\
\textbf{Use Case:} Create a Polynomial\\
\textbf{Summary:} The user creates a polynomial from a sequence of numbers representing coefficients and exponents.\\
\textbf{Actors:} User\\ 
\textbf{Preconditions:} The calculator is turned on and waiting for input.\\
\textbf{Description:} The calculator starts in an idle state waiting for user input. Nothing is initially displayed on the screen. A user enters a sequence of numbers representing coefficients and exponents of a polynomial. The sequence entered is coefficient then exponent. Each number is entered individually, followed by the enter key. The numbers are pushed onto the stack. Once all numbers have been entered, the Poly key is pressed. Each of the previously entered numbers is then popped from the stack and a Polynomial object is created. The new Polynomial object is then pushed back onto the stack and the display is cleared.\\
\textbf{Exceptions:}\\
\textit{Odd Number Count:}There should be an even set of numbers entered to match up coefficients with exponents. If an odd number of items is entered, a valid Polynomial can't be created, and an error is displayed.\\
\textit{Invalid Number:}If an invalid number is entered as a coefficient or exponent, an error is displayed.\\
\textbr{Postconditions:}A new Polynomial object created from the specified coefficients and exponents is created and sitting on the top of the stack waiting to be operated on.\\
\\

\textbf{Use Case:} Operate\\
\textbf{Summary:} The user performs some operation on operands previously entered into the calculator.\\
\textbf{Actors:} User\\
\textbf{Preconditions:} Operands have been entered into the calculator and are waiting on the stack.\\
\textbf{Description:} A user selects an operation from the calculator GUI keypad and presses the enter key. Two operands are then popped from the stack and are manipulated using the chosen operation. The result of the operation is displayed in the GUI and pushed onto the stack.\\
\textbf{Exceptions:} \\
\textit{Not Enough Operands:} If the operator is entered without sufficient operands on the stack, an error is displayed.\\
\textit{Invalid Operation:} If the chosen operation is not valid for a given operand, an error is displayed.\\
\textbf{Postconditions:} The result of the operation is displayed on the calculator screen and is stored at the top of the stack.
